package com.atguigu.day21.test08;

import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;

/**
 * @author fenge
 */
public class Test08 {
    public static void main(String[] args) {
        File f = new File("D:/atguigu");
        System.out.println(Arrays.toString(f.listFiles()));
        method(f);
    }
    static void method(File file){
        if (file.isFile())
            System.out.println(file);
        else if (file.isDirectory())
            for (int i=0;i<file.listFiles().length;i++){
                method(file.listFiles()[i]);
            }

    }
}
